Core Building Blocks

Course- Android >

The Android component is only a piece of code that has a well defined life cycle activity, receiver, service etc.

Android's Core Building Blocks or basic component activities, views, intentions, services, content providers, pieces and Android manifest.exml

Activity

An activity is a square that represents a screen. It's like frames in AWT

Opinion

There is a visual UI element such as buttons, labels, text fields, etc. What you see is the scene

Tthe intention

Intent is used to call components, it is used primarily:

  • Start the service
  • Launch an activity
  • Display a web page
  • Display a list of contacts
  • Broadcast a message
  • Dial a phone call etc.

For example, you may write the following code to view the webpage.


Intent intent=new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("http://www.fastread.in"));
startActivity(intent);

Service

The service is a background process that can last for a long time.

There are two types of local and remote services, the local service is used from within the application, while the remote service is used remotely from other applications running on the same device.

Content Provider

Content providers are used to share data between applications.

Fragment

Fragment are like parts of the activity, an activity can display one or more pieces on the screen at the same time.

AndroidManifest.xml

This includes information about activities, content providers, permissions, etc. This is like a web.xml file in Java EE.

Android Virtual Devices (AVD)

This Android application is used to experiment without the need of mobile or tablet etc. It can be made in different configurations to simulate different types of real devices.